package com.liyl.vo;

import lombok.Data;

@Data
public class Result {

    private Integer code;
    private String msg;

    public static Result ok(){
        Result result = new Result();
        result.setCode(1);
        result.setMsg("ok");
        return result;
    }

    public static Result success(String msg){
        Result result = new Result();
        result.setCode(1);
        result.setMsg(msg);
        return result;
    }

    public static Result error(){
        Result result = new Result();
        result.setCode(500);
        result.setMsg("error");
        return result;
    }
}
